<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app"></div>
  
  <script type="module">
    import { reactive, effect } from './reactivity/index.js'

    // const arr = reactive(['foo'])
    // const arr = reactive([1, 2])
    const obj = {}
    const arr = reactive([])

    effect(() => {
      // console.log(arr.length)
      // console.log(arr[0])
      // for(const key in arr) {
      //   console.log(key)
      // }

      // for(const value of arr) {
      //   console.log(value)
      // }
      // console.log(arr.includes(1))
      // console.log(arr.includes(obj))
      arr.push(1)
    })

    effect(() => {
      arr.push(1)
      console.log(arr)
    })

    // arr[1] = 'bar'
    // arr.length = 0
    // arr.length = 10


  </script>
</body>
</html>
